package com.fusetech.flow.audit.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fusetech.flow.audit.domain.AuditProcessForm;
import com.fusetech.flow.audit.service.dto.AuditProcessFormDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 流程主表表单关系MAPPER接口
 * @author xx
 * @version 2023-05-06
 */
public interface AuditProcessFormMapper extends BaseMapper<AuditProcessForm> {

    /**
     * 根据id获取流程主表表单关系
     * @param id
     * @return
     */
    AuditProcessFormDTO findById(String id);

    /**
     * 获取流程主表表单关系列表
     *
     * @param queryWrapper
     * @return
     */
    IPage <AuditProcessFormDTO> findList(Page <AuditProcessFormDTO> page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper);

    /**
     * 选择审核流程表单列表
     *
     * @param auditProcessForm 审计过程形式
     * @return {@link List}<{@link AuditProcessForm}>
     */
    List<AuditProcessForm> selectAuditProcessFormList(AuditProcessForm auditProcessForm);

    /**
     * 逻辑del审核过程形成进程id
     *
     * @param id id
     * @return int
     */
    int logicDelAuditProcessFormByProcessID(String id);

    /**
     * 删除审核过程形成进程id
     *
     * @param id id
     * @return int
     */
    int deleteAuditProcessFormByProcessID(String id);
}
